home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / src-16f.lha / tools / updates < prev    next >
Encoding:
Text File  |  1991-11-06  |  706 b   |  40 lines

  1. #!/bin/csh -f
  2.  
  3. set from = ""
  4. set to = ""
  5. set mtime = ()
  6. set dirs = ()
  7.  
  8. while ($#argv > 0)
  9.     if ("$argv[1]" !~ -*) then
  10.         set dirs = ($dirs $argv[1])
  11.     else
  12.         switch ($argv[1])
  13.             case "-from":
  14.                 set from = $argv[2]
  15.                 shift
  16.                 breaksw
  17.             case "-to":
  18.                 set to = $argv[2]
  19.                 shift
  20.                 breaksw
  21.             case "-mtime":
  22.                     set mtime = ($argv[1-2])
  23.                 shift
  24.                 breaksw
  25.             default:
  26.                 echo "Bogus switch: $argv[1]"
  27.                 exit
  28.         endsw
  29.     endif
  30.     shift
  31. end
  32.  
  33. if ($#dirs == 0) set dirs = .
  34.  
  35. find $dirs -follow -name '*,v' $mtime -exec rlog  "-d$from<$to" '{}' \; | \
  36.     sed -n -e '/^RCS file:/p' -e '/^------/,/^======/p' | \
  37.     sed -e '/^RCS file:/{;:again\
  38.     N;s/^RCS file.*\nRCS file/RCS file/;t again\
  39.     }' 
  40.